package com.meisupic.copyright.domain.po;

import java.sql.Timestamp;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "abn_download")
public class AbnDownloadPo {

  private Integer id;
  private Integer userId;
  private Timestamp addTime;
  private Integer goodsId;
  private String contractUrl;
  private String resId;
  private String dciCCode;
  private String dciSCode;
  private String dciUrl;
  private String certUrl;
  private String refuse_reason;

  @Id
  @Column(name = "id", nullable = false)
  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  @Basic
  @Column(name = "user_id", nullable = false)
  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  @Basic
  @Column(name = "add_time", nullable = false)
  public Timestamp getAddTime() {
    return addTime;
  }

  public void setAddTime(Timestamp addTime) {
    this.addTime = addTime;
  }

  @Basic
  @Column(name = "goods_id", nullable = false)
  public Integer getGoodsId() {
    return goodsId;
  }

  public void setGoodsId(Integer goodsId) {
    this.goodsId = goodsId;
  }

  @Basic
  @Column(name = "contract_url", nullable = true)
  public String getContractUrl() {
    return contractUrl;
  }

  public void setContractUrl(String contractUrl) {
    this.contractUrl = contractUrl;
  }

  @Basic
  @Column(name = "res_id", nullable = true)
  public String getResId() {
    return resId;
  }

  public void setResId(String resId) {
    this.resId = resId;
  }

  @Basic
  @Column(name = "dcic_code", nullable = true)
  public String getDciCCode() {
    return dciCCode;
  }

  public void setDciCCode(String dciCCode) {
    this.dciCCode = dciCCode;
  }

  @Basic
  @Column(name = "dcis_code", nullable = true)
  public String getDciSCode() {
    return dciSCode;
  }

  public void setDciSCode(String dciSCode) {
    this.dciSCode = dciSCode;
  }

  @Basic
  @Column(name = "dci_url", nullable = true)
  public String getDciUrl() {
    return dciUrl;
  }

  public void setDciUrl(String dciUrl) {
    this.dciUrl = dciUrl;
  }

  @Basic
  @Column(name = "cert_url", nullable = true)
  public String getCertUrl() {
    return certUrl;
  }

  public void setCertUrl(String certUrl) {
    this.certUrl = certUrl;
  }

  @Basic
  @Column(name = "refuse_reason", nullable = true)
  public String getRefuse_reason() {
    return refuse_reason;
  }

  public void setRefuse_reason(String refuse_reason) {
    this.refuse_reason = refuse_reason;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AbnDownloadPo that = (AbnDownloadPo) o;
    return Objects.equals(id, that.id) &&
        Objects.equals(userId, that.userId) &&
        Objects.equals(addTime, that.addTime) &&
        Objects.equals(goodsId, that.goodsId);
  }

  @Override
  public int hashCode() {

    return Objects.hash(id, userId, addTime, goodsId);
  }
}
